![Introducing Enhanced Alert Actions and Triage Functionality](https://cdn.sanity.io/images/cgdhsj6q/production/fe71306d515f85de6139b46745ea7180362324f0-2530x946.png?w=800&fit=max&auto=format)
Product
Introducing Enhanced Alert Actions and Triage Functionality
Socket now supports four distinct alert actions instead of the previous two, and alert triaging allows users to override the actions taken for all individual alerts.
regenerate-unicode-properties
Advanced tools
Package description
The regenerate-unicode-properties package is a tool for generating JavaScript regular expressions based on Unicode properties. It is used to create sets of Unicode symbols that match certain criteria, such as belonging to a particular category, script, or block. This can be useful for text processing tasks that require matching characters with specific Unicode attributes.
Generating regex sets for Unicode categories
This feature allows you to generate regular expressions that match any character from a specific Unicode category, such as letters (category 'L').
const regenerate = require('regenerate-unicode-properties');
const regex = regenerate().addCategory('L').toRegExp();
// regex will match any Unicode letter
Generating regex sets for Unicode scripts
This feature enables the creation of regular expressions that match characters from a specific Unicode script, such as Hiragana.
const regenerate = require('regenerate-unicode-properties');
const regex = regenerate().addScript('Hiragana').toRegExp();
// regex will match any character in the Hiragana script
Generating regex sets for Unicode blocks
With this feature, you can generate regular expressions that match characters within a specific Unicode block, like the Basic Latin block.
const regenerate = require('regenerate-unicode-properties');
const regex = regenerate().addBlock('Basic_Latin').toRegExp();
// regex will match any character in the Basic Latin block
The unicode-regex package allows you to create regular expressions based on Unicode properties, similar to regenerate-unicode-properties. It provides a higher-level API for composing regular expressions using Unicode property escapes.
XRegExp is an extended JavaScript regex library that includes support for additional syntax and features, such as named capture groups and Unicode property escapes. It offers similar functionality for matching Unicode properties but also includes a wide range of other enhancements to regular expressions.
regexpu-core is a library that compiles Unicode-aware regular expressions to ES5. It transforms Unicode property escapes and other Unicode-related regex features to work in older environments. It provides similar Unicode property matching capabilities but focuses on compatibility with non-ES2015 environments.
Readme
regenerate-unicode-properties is a collection of Regenerate sets for Unicode various properties. It’s based on the data for Unicode v9.0.0.
To use regenerate-unicode-properties programmatically, install it as a dependency via npm:
$ npm install regenerate-unicode-properties
To get a list of supported properties, require
it:
const properties = require('regenerate-unicode-properties');
To get a specific Regenerate set:
// Examples:
const Lu = require('regenerate-unicode-properties/General_Category/Uppercase_Letter.js');
const Greek = require('regenerate-unicode-properties/Script_Extensions/Greek.js');
Mathias Bynens |
regenerate-unicode-properties is available under the MIT license.
FAQs
Regenerate sets for Unicode properties and values.
The npm package regenerate-unicode-properties receives a total of 20,155,295 weekly downloads. As such, regenerate-unicode-properties popularity was classified as popular.
We found that regenerate-unicode-properties demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
Socket now supports four distinct alert actions instead of the previous two, and alert triaging allows users to override the actions taken for all individual alerts.
Security News
Polyfill.io has been serving malware for months via its CDN, after the project's open source maintainer sold the service to a company based in China.
Security News
OpenSSF is warning open source maintainers to stay vigilant against reputation farming on GitHub, where users artificially inflate their status by manipulating interactions on closed issues and PRs.